package org.qloudgen.txn.dilithium.cluster.security;

import org.apache.wicket.Component;
import org.apache.wicket.Session;
import org.apache.wicket.authorization.Action;
import org.apache.wicket.authorization.strategies.page.SimplePageAuthorizationStrategy;

public class DilithiumAuthorizationStrategyError extends SimplePageAuthorizationStrategy {

	public DilithiumAuthorizationStrategyError() {

		super(SecurePage.class, LoginPage.class);

	}

	@Override
	protected boolean isAuthorized() {
		return ((DilithiumSession)Session.get()).isUserLoggedIn();
	}

	public boolean isActionAuthorized(Component component,Action action)
	{
		//if (action == Component.ENABLE && component.getId().equals("custID")) return false;
		//if (action == Component.RENDER && component.getId().equals("custID")) return false;
		return true;
	}
}

